// UESphere.cpp: implementation of the CUESphere class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "UESphere.h"
#include "UEEntityOperation.h"
#include <dbsol3d.h>
#include <dbregion.h>
#include <geassign.h>
#include <dbxutil.h>

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CUESphere::CUESphere()
{
	m_CenterPoint = AcGePoint3d(100,200,400);
	m_dbR = 50;
}

CUESphere::~CUESphere()
{

}

CUESphere::CUESphere(
					 const AcGePoint3d &CenterPoint,
					 const double dbR )
{
	m_dbR = dbR;
	m_CenterPoint = CenterPoint;
}

AcDb3dSolid* CUESphere::Create()
{
	AcDb3dSolid* pSld = NULL;

	pSld = new AcDb3dSolid;
	pSld->createSphere(m_dbR);

	AcGeMatrix3d matrix;
	matrix = matrix.translation(m_CenterPoint.asVector());
	pSld->transformBy(matrix);

	return pSld;
}
